package cn.xd.security.controller;

import cn.xd.base.application.aop.SyncBuriedPoint;
import cn.xd.common.response.ResponseResult;
import cn.xd.security.captcha.CaptchaService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/captcha")
public class CaptchaController {
    @Resource
    private CaptchaService captchaService;

    @SyncBuriedPoint(remark = "获取验证码")
    @GetMapping("/getLoginCaptcha")
    public ResponseResult<?> getLoginCaptcha() {
        return ResponseResult.success(captchaService.getLoginCaptcha());
    }
}
